<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="../../css/iuapmobile.um.css">
		<link rel="stylesheet" href="../../css/font-icons.css">
		<link rel="stylesheet" href="../../css/iscroll.css" />
		<style>
			#select1_dummy, #select2_dummy, #select3_dummy, #select4_dummy, #select5_dummy {
				border: none;
				padding-left: 10px;
				color: #555;
				font-size: 17px;
				text-align: right;
				margin-right: 20px;
				width: 100%;
			}
			#select1_dummy:disabled, #select2_dummy:disabled, #select3_dummy:disabled, #select4_dummy:disabled, #select5_dummy:disabled {
				background: #fff;
			}

		</style>

		<style>
			.um-time {
				background: #ffffff;
				border-top: 1px solid #dddddd;
				border-bottom: 1px solid #dddddd;
			}
			.um-time-list {
				height: 46px;
				line-height: 46px;
			}
			.um-time-list:first-child {
				border-bottom: 1px solid #dddddd;
			}
			.um-time-txt {
				float: left;
				color: #8c8d8e;
			}
			.um-time-list .fr {
				position: relative;
				float: right;
				margin-right: 30px;
			}
			.um-time-list .fr:after {
				content: "";
				position: absolute;
				right: -15px;
				top: 15px;
				display: inline-block;
				width: 14px;
				height: 14px;
				border-right: 2px solid #8c8d8e;
				border-top: 2px solid #8c8d8e;
				-webkit-transform: rotate(45deg);
				transform: rotate(45deg);
			}
			.um-time-list input {
				display: block;
				width: 180px;
				height: 45px;
				line-height: 45px;
				border: none;
				outline: none;
				text-align: right;
				background: #fff;
			}
			.cart-reduce, .cart-add {
				display: inline-block;
				font-size: 16px;
				color: RGB(157,194,59);
				white-space: nowrap;
				text-align: center;
				cursor: pointer;
				border-radius: 50%;
				width: 22px;
				height: 22px;
				border: 1px solid RGB(157,194,59);
				padding: 0;
				z-index: 10;
				line-height: 18px;
			}
			.cart-count {
				max-width: 30px;
				border: none;
				border-bottom: 1px solid RGB(157,194,59);
				text-align: center;
				-moz-appearance: textfield;
			}
			.cart-count::-webkit-outer-spin-button, .cart-count::-webkit-inner-spin-button {
				-webkit-appearance: none !important;
				margin: 0;
			}
			.cart-count:focus {
				outline: none;
			}
		</style>
		<script src="../../js/summer.js" ></script>
		<script src="../../js/jquery.min.js" ></script>
		<script src="../../js/iscroll.js"></script>
		<script src="../../js/Frameworks/iuapmobile.frameworks.ui.js" ></script>
		<script src="../../js/angular.min.js"></script>

		<script>
			function $pageReady() {
				/*这里编写与原生服务相关的代码逻辑，例如对原生设备服务的调用，对网络服务的调用等*/
				//alert("Mobile Native Ready");
			}

			$(function() {

			});
		</script>
		<style>
			.self {
				padding: 0;
				margin: 0 0 0 15px
			}
			.self span {
				margin-right: 15px
			}
			.um-list-item-right img {
				width: 30%;
				height: 30%;
				padding: 5px;
			}
			.mustwrite {
				margin-left: 10px
			}
		</style>

	</head>
	<body class="f14" ng-app="myApp" ng-controller="myCtrl" ng-init="sjmtz01='../../img/myimg/camera.png';sbyjz01='../../img/myimg/camera.png';sbjjz01='../../img/myimg/camera.png';brcjz01='../../img/myimg/camera.png';
	sxtz01='../../img/myimg/camera.png';
	sxtz02='../../img/myimg/camera.png';
	sxtz03='../../img/myimg/camera.png';
	sxtz04='../../img/myimg/camera.png';
	sxtz05='../../img/myimg/camera.png';
	sxtz06='../../img/myimg/camera.png';
	sxtz07='../../img/myimg/camera.png';
	sxtz08='../../img/myimg/camera.png';
	sxtz09='../../img/myimg/camera.png';
	sxtz10='../../img/myimg/camera.png';">
		<div class="um-page" id="chaiji">
			<div class="um-header" >
				<a href="#" class="um-back back"> 返回</a>
				<h3>拆机详情</h3>
				<!--<a class="um-header-right" onclick="TemporarySave()">暂存</a>-->
			</div>
			<div class="um-content" id="listview" >

				<ul class="um-list">
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								点位号：
							</div>
							<div class="um-list-item-right">
								<span ng-model="dwh01">{{dwh01}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								商家经营名称：
							</div>
							<div class="um-list-item-right">
								<span ng-model="sjjymc01">{{sjjymc01}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								商家经营地址：
							</div>
							<div class="um-list-item-right">
								<span ng-model="sjjydz01">{{sjjydz01}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								设备编号：
							</div>
							<div class="um-list-item-right">
								<span ng-model="sbbh01">{{sbbh01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								资产编号：
							</div>
							<div class="um-list-item-right">
								<span ng-model="zcbh01">{{zcbh01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								设备型号：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="sbxh01" >{{sbxh01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								品牌：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="pp01" >{{pp01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								店面负责人：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="dmfzr01" >{{dmfzr01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								店面联系方式1：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="dmlxfs101" >{{dmlxfs101}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								店面联系方式2：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="dmlxfs201" >{{dmlxfs201}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								法人代表名称：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="frdbmc01" >{{frdbmc01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								法人联系方式1：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="frlxfs101" >{{frlxfs101}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								法人联系方式2：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="frlxfs201" >{{frlxfs201}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像机数量：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="sxjsl01">{{sxjsl01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								签约人：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="qyr01" >{{qyr01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								签约时间：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="qysj01" >{{qysj01}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								拆机原因：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="cjyy01" >{{cjyy01}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								拟拆除日期：
							</div>
							<div class="um-list-item-right">
								<span  ng-model="nccrq01" >{{nccrq01}}</span>
							</div>
						</div>
					</li>

					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								情况说明：
							</div>
							<div class="um-list-item-right">
								<textarea ng-model="qksm01" cols="30" rows="10" readonly="readonly" disabled="disabled" value="{{qksm01}}" class="form-control">{{qksm01}}</textarea>
							</div>
						</div>
					</li>

				</ul>
				<div class="btn-group btn-group-justify">
					<a href="#tibao" id="tosubmit"></a>
					<button  class="um-btn" onclick="page1_2()">
						提报
					</button>
				</div>

			</div>
		</div>

		<div class="um-page" id="tibao">
			<div class="um-header" >
				<a href="#" class="um-back"> 返回 </a>
				<h3>拆机提报</h3>
			</div>
			<div class="um-content">
				<ul class="um-list">
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								商家门头照：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sjmtz01" ng-model="sjmtz01" ng-src="{{sjmtz01}}" class="h50 p5 camera"/>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								设备远景照：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sbyjz01" ng-model="sbyjz01" ng-src="{{sbyjz01}}" class="h50 p5 camera"/>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								设备近景照：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sbjjz01" ng-model="sbjjz01" ng-src="{{sbjjz01}}" class="h50 p5 camera"/>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								本人出镜照：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="brcjz01" ng-model="brcjz01" ng-src="{{brcjz01}}" class="h50 p5 camera"/>
							</div>
						</div>
					</li>

					<li class="um-list-item" id="sxtzs01" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照1：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz01" ng-model="sxtz01" ng-src="{{sxtz01}}" class="h50 p5 camera"/>
							</div>

						</div>
					</li>
					<li class="um-list-item" id="sxtzs02" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照2：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz02" ng-model="sxtz02" ng-src="{{sxtz02}}" class="h50 p5 camera"/>
							</div>

						</div>
					</li>
					<li class="um-list-item" id="sxtzs03" style="display: none">
						<div class="um-list-item-inner" >
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照3：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz03" ng-model="sxtz03" ng-src="{{sxtz03}}" class="h50 p5 camera"/>
							</div>

						</div>
					</li>
					<li class="um-list-item" id="sxtzs04" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照4：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz04" ng-model="sxtz04" ng-src="{{sxtz04}}" class="h50 p5 camera"/>
							</div>

						</div>
					</li>
					<li class="um-list-item" id="sxtzs05" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照5：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz05"  ng-model="sxtz05" ng-src="{{sxtz05}}" class="h50 p5 camera"/>
							</div>

						</div>
					</li>
					<li class="um-list-item" id="sxtzs06" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照6：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz06"  ng-model="sxtz06" ng-src="{{sxtz06}}" class="h50 p5 camera"/>
							</div>
						</div>
					</li>
					<li class="um-list-item" id="sxtzs07" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照7：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz07"  ng-model="sxtz07" ng-src="{{sxtz07}}" class="h50 p5 camera"/>
							</div>

						</div>
					</li>
					<li class="um-list-item" id="sxtzs08" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照8：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz08"  ng-model="sxtz08" ng-src="{{sxtz08}}" class="h50 p5 camera"/>
							</div>

						</div>
					</li>
					<li class="um-list-item" id="sxtzs09" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照9：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz09"  ng-model="sxtz09" ng-src="{{sxtz09}}" class="h50 p5 camera"/>
							</div>

						</div>
					</li>
					<li class="um-list-item" id="sxtzs10" style="display: none">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								摄像头照10：
							</div>
							<div class="um-list-item-right">
								<img onclick="openCamera(this,pageid)" id="sxtz10"  ng-model="sxtz10" ng-src="{{sxtz10}}" class="h50 p5 camera"/>
							</div>
						</div>
					</li>
					<li class="um-list-item" id="selfdevicecode" >
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								设备编号：
							</div>
							<div class="um-list-item-right">
								<div class="um-box">
									<div class="um-bf4 p5">
										<input id="devicecode" ng-model="devicecode" type="text" value="{{devicecode}}" class="form-control tr" placeholder="请填写">
									</div>
									<img  id="esn" onclick='scannerCode("devicecode")' ng-src="../../img/myimg/scanner.png" class="h50 p5"/>
								</div>
							</div>
						</div>
					</li>
					<li class="um-list-item" id="selfzcbm">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								资产编号：
							</div>
							<div class="um-list-item-right">
								<input onKeyUp="angularScope.zcbm=angularScope.zcbm.replace(/[\W]/g,'');angularScope.$apply();" id="zcbm" ng-model="zcbm" type="text" value="{{zcbm}}" class="form-control tr" placeholder="请填写">
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								实际拆除摄像头数：
							</div>
							<div class="um-list-item-right">
								<input id="equipment_no" ng-model="sjccsxts01" type="number" value="{{sjccsxts01}}" class="form-control tr" placeholder="请填写">
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<span class="h pa um-box-vc um-red f20 pl5" >*</span>
							<div class="um-list-item-left pl15">
								设备去向：
							</div>
							<div class="um-list-item-right">
								<select id='select3' class="select">
									<option ng-repeat="r in sbqx01">{{r.sbqx_name}}</option>
								</select>
							</div>
						</div>
					</li>
				</ul>
			</div>
			<div class="um-footer">
				<button class="um-btn" onclick="submitdata()">
					提交
				</button>
			</div>
		</div>

		<script>
			var pageid = "chaiji";
			var sumbitstate;
			$(function() {
				// var curr = new Date().getFullYear();
				var opt = {
					'date' : {
						preset : 'date'
					},
					'select' : {
						preset : 'select'
					}
				};
				$('.select').scroller('destroy').scroller($.extend(opt['select'], {
					theme : "ios7",
					mode : "scroller",
					display : "bottom",
					animate : ""
				}));
			});

			function page1_2() {
				if (sumbitstate == 2) {
					UM.confirm({
						title : '友情提示：',
						text : '即将跳转到提报',
						btnText : ["取消", "确认"],
						overlay : true,
						ok : function() {
							$("#tosubmit").click();
						},
						cancle : function() {
						}
					});
				}else{
				  toasts("请先接受派工");
				}
			}

			var data = {};

			var idlist = new Array();
			var images = new Array();
			var angularScope;
			//anglajs
			var pageParam;
			//打开当前页的参数
			var changeObj;
			//根据单号加载的数据 修改
			var bodyid;
			var pageparam;
			var timeIdex;
			var billcode;
			var selectdatas;
			var sbqx;
			var sbqx01 = document.getElementById("select3");
			var finshType;
			function getselectValue(obj) {
				return obj.options[obj.selectedIndex].value;
			}

			function toast(Msgtext) {
				UM.toast({
					title : '友情提示：',
					text : Msgtext,
					duration : 1000
				});
			}

			function getData() {
				try {
					var binddatas = {
						sjmtz01 : imgs["sjmtz01"] == null ? "" : imgs["sjmtz01"],
						sbyjz01 : imgs["sbyjz01"] == null ? "" : imgs["sbyjz01"],
						sbjjz01 : imgs["sbjjz01"] == null ? "" : imgs["sbjjz01"],
						brcjz01 : imgs["brcjz01"] == null ? "" : imgs["brcjz01"],
						sxtz01 : imgs["sxtz01"] == null ? "" : imgs["sxtz01"],
						sxtz02 : imgs["sxtz02"] == null ? "" : imgs["sxtz02"],
						sxtz03 : imgs["sxtz03"] == null ? "" : imgs["sxtz03"],
						sxtz04 : imgs["sxtz04"] == null ? "" : imgs["sxtz04"],
						sxtz05 : imgs["sxtz05"] == null ? "" : imgs["sxtz05"],
						sxtz06 : imgs["sxtz06"] == null ? "" : imgs["sxtz06"],
						sxtz07 : imgs["sxtz07"] == null ? "" : imgs["sxtz07"],
						sxtz08 : imgs["sxtz08"] == null ? "" : imgs["sxtz08"],
						sxtz09 : imgs["sxtz09"] == null ? "" : imgs["sxtz09"],
						sxtz10 : imgs["sxtz10"] == null ? "" : imgs["sxt10"],
						sjccsxts01 : angularScope.sjccsxts01 == null ? "" : angularScope.sjccsxts01,
						sbqx01 : getselectValue(sbqx01) == null ? "" : getpk("sbqx_name", getselectValue(sbqx01)),
						bodyid : bodyid
					};
				} catch(e) {
					console.log(e);
				}
				return binddatas;
			}

			//提交数据
			function submitdata() {
				//字段
				var visa_type = document.getElementById("select3");
				if (!imgs["sjmtz01"]) {
					toast("请重新拍摄商家门头照");
					return;
				}
				if (!imgs["sbyjz01"]) {
					toast("请重新拍摄设备远景照");
					return;
				}
				if (!imgs["sbjjz01"]) {
					toast("请重新拍摄设备近景照");
					return;
				}
				if (!imgs["brcjz01"]) {
					toast("请重新拍摄本人出镜照");
					return;
				}
				if(!angularScope.sjccsxts01){
				   toast("请重新填写实际拆除摄像头数");
					return;
				}
				if(!getselectValue(sbqx01)){
				   toast("请重新选择设备去向");
					return;
				}
				if (finshType == "itemClick") {
					if (!angularScope.devicecode) {
						toast("请重新扫描设备编号");
						return;
					}
					if (!angularScope.zcbm) {
						toast("请重新填写资产编号");
						return;
					}
					if (angularScope.devicecode != angularScope.sbbh01) {
						toast("请重新扫描设备编号");
						return;
					}
					if (angularScope.zcbm != angularScope.zcbh01) {
						toast("请重新填写资产编号");
						return;
					}
				}

				var datass = getData();
				console.log(datass);
				doPost(adressHead.IDisassembleImpl, "appJsCjpgWgtb", {
					dataParm : datass
				}, function(data) {
					if (data.result == 1) {
						UM.toast({
							title : '友情提示：',
							text : data.msg,
							duration : 1000
						});
						setTimeout(function() {
							summer.execScript({
								winId : 'installed',
								script : "rebind()"
							});
							summer.closeWin();
						}, 1000);
					} else {
						UM.toast({
							title : '友情提示：',
							text : data.msg,
							duration : 1000
						});
					}
				}, function(err) {
					UM.toast({
						title : '友情提示：',
						text : err.msg,
						duration : 1000
					});
				});
			}

			var format = function(time, format) {
				var t = new Date(time);
				var tf = function(i) {
					return (i < 10 ? '0' : '') + i
				};
				return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a) {
					switch (a) {
					case 'yyyy':
						return tf(t.getFullYear());
						break;
					case 'MM':
						return tf(t.getMonth() + 1);
						break;
					case 'mm':
						return tf(t.getMinutes());
						break;
					case 'dd':
						return tf(t.getDate());
						break;
					case 'HH':
						return tf(t.getHours());
						break;
					case 'ss':
						return tf(t.getSeconds());
						break;
					}
				});
			}
			function scannerCode(id) {
				summer.openScanner({
					callback : function(args) {
						angularScope[id] = summer.getDeviceInfo().os == "ios" ? args : args.umdcode;
						//$("#" + id).css("display", "none");
						angularScope.$apply();
					}
				});
			}

			/**
			 * 初始化
			 */
			function setData(jsondata) {
				console.log(jsondata);
				var datanum = document.getElementsByTagName("input");
				for (var j = 0; j < datanum.length; j++) {
					if (datanum[j].type == "number") {
						datanum[j].value = 0;
					}
				}
				jsondata.sbqx01 = sbqx;

				for (var s in jsondata) {
					if (s.indexOf("image") > 0) {
						if (jsondata[s] != "") {
							angularScope[s] = "data:image/jpeg;base64," + jsondata[s];
							imgs[s] = "data:image/jpeg;base64," + jsondata[s];
						} else {
							angularScope[s] = '../../img/myimg/camera.png';
						}
					} else {
						angularScope[s] = jsondata[s];
					}
					angularScope.$apply();
				}
			}

			function getpk(pk, val) {
				for (var i = 0; i < sbqx.length; i++) {
					var returnvalue = pk == "sbqx_name" ? "sbqx_pk" : "sbqx_name";
					if (sbqx[i][pk] == val) {
						return sbqx[i][returnvalue];
					}
				}
			}


			$('.select').change(function() {
				$("#" + $(this).attr("id") + "_dummy").val($(this).find("option:selected").text());
				switch ($(this).attr("id")) {
				case "select3":
					$("#select3_dummy").val($(this).val());
					break;
				}
			});

			var app = angular.module('myApp', []);
			app.controller('myCtrl', function($scope, $http) {
				timeIdex = new Date();
				$scope.install_date = new Date(timeIdex);
				$scope.installation_time = new Date(timeIdex);
				angularScope = $scope;
				angularScope.complete_state = true;
				angularScope.visa_whether = true;
				/**
				 * 默认为0
				 */

			});

			summerready = function() {
				var imglist;
				if (summer.pageParam) {
					bodyid = summer.pageParam.billid;
					sumbitstate = summer.pageParam.sumbitstate;
					sbqx = summer.pageParam.sbqx;
					finshType = summer.pageParam.type;
					setData(summer.pageParam.itemdata);
					imglist = summer.pageParam.itemdata.sxjsl01;
					alert(JSON.stringify(summer.pageParam));
				}
				if (finshType != "itemClick") {
					$("#selfdevicecode").css("display", "none");
					$("#selfzcbm").css("display", "none");
				}
				if (imglist > 0) {
					for (var i = 1; i <= imglist; i++) {
						i > 9 ? $("#sxtzs" + i).css("display", "block") : $("#sxtzs0" + i).css("display", "block");
					}
				}
			}

		</script>
		<script src="../../js/Myjs/Common.js"></script>
	</body>
</html>
<!-- this file save -->